package com.csf.core.ssl.client;

import javax.net.ssl.SSLContext;

public class ClientSSLContextFactory {

	private static final String PROTOCOL = "TLS";
	private static final SSLContext CLIENT_CONTEXT;

	static {
		SSLContext clientContext = null;

		try {
			clientContext = SSLContext.getInstance(PROTOCOL);
			clientContext.init(null, TrustManagerFactory.getTrustManagers(),
					null);
		} catch (Exception e) {
			throw new Error("Failed to initialize the client-side SSLContext",
					e);
		}

		CLIENT_CONTEXT = clientContext;
	}

	public static SSLContext getClientContext() {
		return CLIENT_CONTEXT;
	}

	
}
